import wx, { Component, PropTypes } from 'labrador-immutable';
import { bindActionCreators } from 'redux';
import { connect } from 'labrador-redux';
import { createAction } from 'redux-actions';

const { array, object, func } = PropTypes;

class Index extends Component {

  // 属性定义
  static propTypes = {
  };

  state = {
  }

  onShow() {
  }

  onUnload() {
  }

  // 处理微信登录
  handleWechatLogin(event) {
    this.props.wechatLogin(event.detail);
  }
}

// 输出值
export default connect(
  ({ user, timmer }) => ({ user, timmer }),
  (dispatch) => bindActionCreators({
    wechatLogin: createAction('user/wechatLogin')
  }, dispatch)
)(Index);
